package Aplicacion;

import java.util.ArrayList;
import java.util.List;



import org.uqbar.arena.actions.MessageSend;
import org.uqbar.arena.layout.ColumnLayout;
import org.uqbar.arena.widgets.Button;
import org.uqbar.arena.widgets.Label;
import org.uqbar.arena.widgets.Panel;
import org.uqbar.arena.widgets.Selector;
import org.uqbar.arena.windows.SimpleWindow;
import org.uqbar.arena.windows.WindowOwner;
import org.uqbar.commons.model.ObservableObject;
import org.uqbar.commons.utils.ApplicationContext;
import org.uqbar.commons.utils.Home;


import Aplicacion.FotoMultasContext;
import Aplicacion.Imagen;
import Homes.InfraccionesHome;
import Homes.CapturasHome;

public class AgregarInfraccion extends ObservableObject {
	public static final String INFRACCION = null;
	public static final String PATENTE = null;
	private Infraccion infraccion;
	private String patente;
	private List<Infraccion> infracciones;
	private  CapturasHome CapturasHome;
	private Imagen imagen;
	
	public AgregarInfraccion(Home<Infraccion> home){
		this.infracciones=home.getObjects();
	}
	
	// ********************************************************
	// ** Actions
	// ********************************************************

	public void crearCaptura() {
		this.CapturasHome.ingresarPatenteManual(new Captura(this.imagen,this.infraccion),this.getVehiculo());
	}

	// ********************************************************
	// ** Accessors
	// ********************************************************

	public Infraccion getPaquete() {
		return this.infraccion;
	}

	public void setInfraccion(Infraccion infraccion) {
		this.setFieldValue(INFRACCION, infraccion);
	}

	public String getVehiculo() {
		return this.patente;
	}

	public void setPatente(String patente) {
		this.setFieldValue(PATENTE, patente);
	}	

}
